#include "cnutrition.h"

using namespace cooking;

CNutrition::CNutrition(QObject *parent) :
    CObject(parent)
{
    m_description = KNullString;
    m_name = KNullString;
}

QString CNutrition::name() {
    return m_name;
}

void CNutrition::setName(QString name) {
    if (m_name != name) {
        m_name = name;
        emit nameChanged();
    }
}

QString CNutrition::description() {
    return m_description;
}

void CNutrition::setDescription(QString description) {
    if (m_description != description) {
        m_description = description;
        emit descriptionChanged();
    }
}

int CNutrition::unitTypeId() {
    return m_unit_type_id;
}

void CNutrition::setUnitTypeId(int unitTypeId) {
    if (m_unit_type_id != unitTypeId) {
        m_unit_type_id = unitTypeId;
        emit unitTypeIdChanged();
    }
}
